

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/favicon.png">
  <link rel="icon" href="/img/favicon.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="description" content="">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  <meta name="description" content="介绍最近突然需要写一些包含多种动画的首页，偶然找到了gsap，发现是真的好用，这里对其一些api做下简单介绍。   正文gsap是一个javascript动画库，可以让开发者通过简单的api完成非常复杂的动画，包含非常多种类型的动画的实现，比如css3动画，svg动画以及canvas、webgl等。   官网给出了大量的示例代码，可以前往查看    但是它的缺点就是有些功能是付费的🤷🏻‍♀️，">
<meta property="og:type" content="article">
<meta property="og:title" content="gsap动画的简单使用">
<meta property="og:url" content="http://yoursite.com/2022/06/23/gsap%E5%8A%A8%E7%94%BB%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8/index.html">
<meta property="og:site_name" content="Food-Billboard">
<meta property="og:description" content="介绍最近突然需要写一些包含多种动画的首页，偶然找到了gsap，发现是真的好用，这里对其一些api做下简单介绍。   正文gsap是一个javascript动画库，可以让开发者通过简单的api完成非常复杂的动画，包含非常多种类型的动画的实现，比如css3动画，svg动画以及canvas、webgl等。   官网给出了大量的示例代码，可以前往查看    但是它的缺点就是有些功能是付费的🤷🏻‍♀️，">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2022-06-23T01:43:00.000Z">
<meta property="article:modified_time" content="2022-06-23T01:47:13.000Z">
<meta property="article:author" content="John Doe">
<meta property="article:tag" content="animation">
<meta name="twitter:card" content="summary_large_image">
  
  <title>gsap动画的简单使用 - Food-Billboard</title>

  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/css/bootstrap.min.css" />


  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@4/github-markdown.min.css" />
  <link  rel="stylesheet" href="/lib/hint/hint.min.css" />

  
    
    
      
      <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/highlight.js@10/styles/github-gist.min.css" />
    
  

  
    <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.css" />
  


<!-- 主题依赖的图标库，不要自行修改 -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_ba1fz6golrf.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_kmeydafke9r.css">


<link  rel="stylesheet" href="/css/main.css" />

<!-- 自定义样式保持在最底部 -->


  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    var CONFIG = {"hostname":"yoursite.com","root":"/","version":"1.8.12","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"right","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"copy_btn":true,"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname"}},"search_path":"/local-search.xml"};
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
<!-- hexo injector head_end start -->
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/bynotes/texiao/source/css/toubudaziji.css"></link>
  <link rel="stylesheet" href="//cdn.jsdelivr.net/gh/bynotes/texiao/source/css/shubiao.css"></link>
<!-- hexo injector head_end end --><meta name="generator" content="Hexo 5.4.0"></head>


<body>
  <header style="height: 70vh;">
    <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>Fluid</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/project">
                <i class="iconfont icon-books"></i>
                项目
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

    <div class="banner" id="banner" parallax=true
         style="background: url('/images/gsap%E5%8A%A8%E7%94%BB%E7%9A%84%E7%AE%80%E5%8D%95%E4%BD%BF%E7%94%A8/background.png') no-repeat center center;
           background-size: cover;">
      <div class="full-bg-img">
        <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
          <div class="page-header text-center fade-in-up">
            <span class="h2" id="subtitle" title="gsap动画的简单使用">
              
            </span>

            
              <div class="mt-3">
  
  
    <span class="post-meta">
      <i class="iconfont icon-date-fill" aria-hidden="true"></i>
      <time datetime="2022-06-23 09:43" pubdate>
        2022年6月23日 上午
      </time>
    </span>
  
</div>

<div class="mt-1">
  
    <span class="post-meta mr-2">
      <i class="iconfont icon-chart"></i>
      2.5k 字
    </span>
  

  
    <span class="post-meta mr-2">
      <i class="iconfont icon-clock-fill"></i>
      
      
      8 分钟
    </span>
  

  
  
</div>

            
          </div>

          
        </div>
      </div>
    </div>
  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="d-none d-lg-block col-lg-2"></div>
    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div class="py-5" id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">gsap动画的简单使用</h1>
            
            <div class="markdown-body">
              <h2 id="介绍"><a href="#介绍" class="headerlink" title="介绍"></a>介绍</h2><p>最近突然需要写一些包含多种动画的首页，偶然找到了<a target="_blank" rel="noopener" href="https://greensock.com/">gsap</a>，发现是真的好用，这里对其一些<code>api</code>做下简单介绍。  </p>
<h2 id="正文"><a href="#正文" class="headerlink" title="正文"></a>正文</h2><p><code>gsap</code>是一个<code>javascript</code>动画库，可以让开发者通过简单的<code>api</code>完成非常复杂的动画，包含非常多种类型的动画的实现，比如<code>css3</code>动画，<code>svg</code>动画以及<code>canvas</code>、<code>webgl</code>等。  </p>
<p>官网给出了大量的示例代码，可以<a target="_blank" rel="noopener" href="https://codepen.io/collection/AQPByE">前往查看</a>  </p>
<blockquote>
<p>但是它的缺点就是有些功能是付费的🤷🏻‍♀️，比如<code>SplitText</code>、<code>DrawSvg</code>等功能，他们能实现非常炫酷的动画效果，有兴趣的可以自行购买使用。（反正我不买😺）  </p>
</blockquote>
<ul>
<li>以下的介绍全部都是<strong>gsap3</strong>的内容。  </li>
</ul>
<h3 id="使用"><a href="#使用" class="headerlink" title="使用"></a>使用</h3><p>本次使用大概用到了以下几个<code>api</code>：<code>to</code>、<code>from</code>、<code>timeline</code>。<br>用到的插件为：<code>ScrollTrigger</code>、<code>TextPlugin</code>、<code>MotionPathPlugin</code>  </p>
<h4 id="插件"><a href="#插件" class="headerlink" title="插件"></a>插件</h4><p>使用的插件都需要提前注册。  </p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><code class="hljs javascript"><span class="hljs-keyword">import</span> &#123; gsap &#125; <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;gsap&#x27;</span><br><span class="hljs-keyword">import</span> &#123; ScrollTrigger &#125; <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;gsap/ScrollTrigger&#x27;</span><br><span class="hljs-keyword">import</span> &#123; TextPlugin &#125; <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;gsap/TextPlugin&#x27;</span><br><span class="hljs-keyword">import</span> &#123; MotionPathPlugin &#125; <span class="hljs-keyword">from</span> <span class="hljs-string">&#x27;gsap/MotionPathPlugin&#x27;</span><br><br>gsap.registerPlugin(ScrollTrigger, TextPlugin, MotionPathPlugin)<br></code></pre></td></tr></table></figure>

<h5 id="ScrollTrigger"><a href="#ScrollTrigger" class="headerlink" title="ScrollTrigger"></a>ScrollTrigger</h5><p>  <code>ScrollTrigger</code>为滚动操作的关联动画，用户可以根据滚动实现相关的动画。  </p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs js">gsap.to(<span class="hljs-string">&#x27;div&#x27;</span>, &#123;<br>  <span class="hljs-attr">x</span>: <span class="hljs-number">100</span>,<br>  <span class="hljs-attr">scrollTrigger</span>: &#123;<br>    <span class="hljs-attr">trigger</span>: <span class="hljs-string">&#x27;div&#x27;</span>, <span class="hljs-comment">//触发滚动动画的元素</span><br>    <span class="hljs-attr">start</span>: <span class="hljs-string">&#x27;start bottom&#x27;</span>, <span class="hljs-comment">// 动画开始执行的时机（开始/结束）</span><br>    <span class="hljs-comment">// 四个字符串代表四个时机：onEnter onLeave onEnterBack onLeaveBack</span><br>    <span class="hljs-comment">// 每个时机所有的动画类型：play pause resume reset restart complete reverse none </span><br>    <span class="hljs-attr">toggleAction</span>: <span class="hljs-string">&#x27;play none none reverse&#x27;</span>, <span class="hljs-comment">// 动画对应时间触发的动作  </span><br>    <span class="hljs-attr">scrub</span>: <span class="hljs-literal">true</span>, <span class="hljs-comment">// 是否跟随鼠标滚动执行动画，边滚动边执行动画</span><br>  &#125;<br>&#125;)<br></code></pre></td></tr></table></figure>
<p>  <a target="_blank" rel="noopener" href="https://codepen.io/GreenSock/pens/tags/?selected_tag=scrolltrigger">官网例子</a>  </p>
<h5 id="TextPlugin"><a href="#TextPlugin" class="headerlink" title="TextPlugin"></a>TextPlugin</h5><p>  <code>TextPlugin</code>为一些文字动画的插件，我理解的是文字动画的基础版。<br>  暂时没有用到啥特殊的配置。<br>  <a target="_blank" rel="noopener" href="https://codepen.io/collection/DmQpRq">官网例子</a>    </p>
<h5 id="MotionPathPlugin"><a href="#MotionPathPlugin" class="headerlink" title="MotionPathPlugin"></a>MotionPathPlugin</h5><p>  <code>MotionPathPlugin</code>为路径动画，可以通过<code>svg</code>的<code>path</code>实现相关的动画。  </p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><code class="hljs js">gsap.to(<span class="hljs-string">&#x27;div&#x27;</span>, &#123;<br>  <span class="hljs-attr">motionPath</span>: &#123;<br>    <span class="hljs-attr">path</span>: <span class="hljs-string">&quot;#path&quot;</span>, <span class="hljs-comment">// svg路径元素</span><br>    <span class="hljs-attr">align</span>: <span class="hljs-string">&quot;#path&quot;</span>, <span class="hljs-comment">// 对齐到路径</span><br>    <span class="hljs-attr">autoRotate</span>: <span class="hljs-literal">true</span>, <span class="hljs-comment">// 自动旋转，会跟随路径自动旋转动画元素</span><br>    <span class="hljs-attr">alignOrigin</span>: [<span class="hljs-number">0.5</span>, <span class="hljs-number">0.5</span>] <span class="hljs-comment">// 与路径的重合程度，当前设置表示居中  </span><br>  &#125;<br>&#125;)<br></code></pre></td></tr></table></figure>

<p>  <a target="_blank" rel="noopener" href="https://codepen.io/GreenSock/pens/tags/?selected_tag=motionpathplugin">官网例子</a>  </p>
<h4 id="to"><a href="#to" class="headerlink" title="to"></a>to</h4><p>表示元素从当前状态转换为<code>to</code>指定的一些动画状态。<br>比如，将元素移动到<code>(100, 100)</code>，并且<code>opacity</code>从1到0。  </p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs js">gsap.to(<span class="hljs-string">&#x27;div&#x27;</span>, &#123;<br>  <span class="hljs-attr">x</span>: <span class="hljs-number">100</span>,<br>  <span class="hljs-attr">y</span>: <span class="hljs-number">100</span>,<br>  <span class="hljs-attr">opacity</span>: <span class="hljs-number">0</span>,<br>&#125;)<br></code></pre></td></tr></table></figure>
<p>下面介绍其中一些常用的属性，与下面<code>from</code>方法的参数基本相同。  </p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><code class="hljs js"><span class="hljs-keyword">const</span> Option = &#123;<br>  <span class="hljs-attr">duration</span>: <span class="hljs-number">1</span>, <span class="hljs-comment">// 动画执行的时间</span><br>  <span class="hljs-attr">repeat</span>: <span class="hljs-number">1</span>, <span class="hljs-comment">// 重复次数，-1无限制</span><br>  <span class="hljs-attr">repeatDelay</span>: <span class="hljs-number">1</span>, <span class="hljs-comment">// 二次执行动画的延迟时间  </span><br>  <span class="hljs-attr">yoyo</span>: <span class="hljs-literal">true</span>, <span class="hljs-comment">// 动画是否重复往返执行，比如：从1-2，然后从2-1  </span><br>  <span class="hljs-attr">stagger</span>: <span class="hljs-number">0.5</span>, <span class="hljs-comment">// 多个动画错开执行的时间间隔  </span><br>  <span class="hljs-attr">ease</span>: <span class="hljs-string">&#x27;power1.inOut&#x27;</span>, <span class="hljs-comment">// 动画的速度曲线，详细可以查看文件 /node_modules/gsap/types/ease.d.ts  </span><br>  <span class="hljs-comment">// css 属性</span><br>  <span class="hljs-attr">scale</span>: <span class="hljs-number">1</span> <span class="hljs-comment">// 缩放</span><br>  <span class="hljs-attr">rotate</span>: <span class="hljs-number">1</span>, <span class="hljs-comment">// 旋转</span><br>  <span class="hljs-attr">transformOrigin</span>: <span class="hljs-string">&#x27;center&#x27;</span>, <span class="hljs-comment">// 变换中心点</span><br>  <span class="hljs-attr">width</span>: <span class="hljs-number">100</span>, <span class="hljs-comment">// 宽度 100vh 100px 100% 都可以</span><br>  <span class="hljs-attr">height</span>: <span class="hljs-number">100</span>, <span class="hljs-comment">// 高度同理</span><br>  <span class="hljs-attr">visibility</span>: <span class="hljs-string">&#x27;visible&#x27;</span>, <span class="hljs-comment">// 显示隐藏  </span><br>  <span class="hljs-attr">backgroundColor</span>: <span class="hljs-string">&#x27;red&#x27;</span>, <span class="hljs-comment">// 颜色</span><br>&#125;<br></code></pre></td></tr></table></figure>


<h4 id="from"><a href="#from" class="headerlink" title="from"></a>from</h4><p>与<code>to</code>相反，表示元素从<code>from</code>状态转为<code>元素当前状态</code>。  </p>
<h4 id="timeline"><a href="#timeline" class="headerlink" title="timeline"></a>timeline</h4><p><code>timeline</code>可以理解成上述<code>api</code>的一个集合。<br>有时可能需要按照时间顺序，按顺序的执行一系列的动画任务，这将是很有帮助的。  </p>
<p>比如一个矩形元素，首先<code>x</code>移动到<code>100</code>，接着<code>y</code>移动到<code>100</code>，即以下代码：</p>
<figure class="highlight js"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><code class="hljs js">gsap.timeline()<br>.to(<span class="hljs-string">&#x27;div&#x27;</span>, &#123;<br>  <span class="hljs-attr">x</span>: <span class="hljs-number">100</span><br>&#125;)<br>.to(<span class="hljs-string">&#x27;div&#x27;</span>, &#123;<br>  <span class="hljs-attr">y</span>: <span class="hljs-number">100</span><br>&#125;)<br></code></pre></td></tr></table></figure>

<p><a target="_blank" rel="noopener" href="https://codepen.io/GreenSock/pens/tags/?selected_tag=timeline">官网示例</a></p>
<h4 id="其他"><a href="#其他" class="headerlink" title="其他"></a>其他</h4><p><code>gsap</code>的动画能力非常的强，但是也有限制性，以下为本人观点，不一定正确：<br>  其实现动画的<code>css</code>能力与<code>transition</code>有非常大的关系，只有能响应<code>transition</code>的属性才能形成动画，比如<code>width</code>、<code>height</code>、<code>backgroundColor</code>、<code>scale</code>等。<br>  但是有些属性是无法响应的，比如<code>display</code>，当设置其从<code>block</code>变为<code>none</code>时，为瞬间变化，无动画效果。  </p>
<h2 id="结束"><a href="#结束" class="headerlink" title="结束"></a>结束</h2><p><code>gsap</code>的功能非常的强大，以上使用的功能只是皮肤，各位可以自己去琢磨。<br>顺便看下本人使用的效果：<a target="_blank" rel="noopener" href="https://food-billboard.github.io/create-chart-docs/">gh-pages</a>或<a target="_blank" rel="noopener" href="http://47.97.27.23/api/backend/create-chart-docs/index.html">私人服务器</a>。</p>

            </div>
            <hr>
            <div>
              <div class="post-metas mb-3">
                
                
                  <div class="post-meta">
                    <i class="iconfont icon-tags"></i>
                    
                      <a class="hover-with-bg" href="/tags/animation/">animation</a>
                    
                  </div>
                
              </div>
              
                <p class="note note-warning">
                  
                    本博客所有文章除特别声明外，均采用 <a target="_blank" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh" rel="nofollow noopener noopener">CC BY-SA 4.0 协议</a> ，转载请注明出处！
                  
                </p>
              
              
                <div class="post-prevnext">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2022/07/08/parallax%E4%BD%BF%E7%94%A8/">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">parallax使用</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2022/04/21/%E6%9C%8D%E5%8A%A1%E7%AB%AFpuppeteer%E7%9A%84%E4%BD%BF%E7%94%A8/">
                        <span class="hidden-mobile">服务端puppeteer的使用</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>
    
      <div class="d-none d-lg-block col-lg-2 toc-container" id="toc-ctn">
        <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>

      </div>
    
  </div>
</div>

<!-- Custom -->


    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v"
                 for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>
    

    
  </main>

  <footer class="text-center mt-5 py-3">
  <div class="footer-content">
     <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> <div style="font-size: 0.85rem"> <span id="timeDate">载入天数...</span> <span id="times">载入时分秒...</span> <script src="/js/duration.js"></script> <script src="/js/code-viewer.js"></script> </div> 
  </div>
  
  <div class="statistics">
    
    

    
      
        <!-- 不蒜子统计PV -->
        <span id="busuanzi_container_site_pv" style="display: none">
            总访问量 
            <span id="busuanzi_value_site_pv"></span>
             次
          </span>
      
      
        <!-- 不蒜子统计UV -->
        <span id="busuanzi_container_site_uv" style="display: none">
            总访客数 
            <span id="busuanzi_value_site_uv"></span>
             人
          </span>
      
    
  </div>


  

  
</footer>


  <!-- SCRIPTS -->
  
  <script  src="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://cdn.jsdelivr.net/npm/nprogress@0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js" ></script>
<script  src="https://cdn.jsdelivr.net/npm/bootstrap@4/dist/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>

<!-- Plugins -->


  <script  src="/js/local-search.js" ></script>



  
    <script  src="/js/img-lazyload.js" ></script>
  



  



  
    <script  src="https://cdn.jsdelivr.net/npm/tocbot@4/dist/tocbot.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3/dist/jquery.fancybox.min.js" ></script>
  
  
    <script  src="https://cdn.jsdelivr.net/npm/anchor-js@4/anchor.min.js" ></script>
  
  
    <script defer src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js" ></script>
  



  <script defer src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" ></script>




  <script  src="https://cdn.jsdelivr.net/npm/typed.js@2/lib/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var title = document.getElementById('subtitle').title;
      
      typing(title)
      
    })(window, document);
  </script>















<!-- 主题的启动项 保持在最底部 -->
<script  src="/js/boot.js" ></script>


<!-- hexo injector body_end start -->
  <script src="//cdn.jsdelivr.net/gh/bynotes/texiao/source/js/xiantiao.js"></script>
  <script src="//cdn.jsdelivr.net/gh/bynotes/texiao/source/js/xiaoxingxing.js"></script>
  <script src="//cdn.jsdelivr.net/gh/bynotes/texiao/source/js/dianjichuzi.js"></script>
<!-- hexo injector body_end end --><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"jsonPath":"/live2dw/assets/shizuku.model.json"},"display":{"position":"right","width":150,"height":300,"mobile":{"show":true}},"log":false});</script></body>
</html>
